<!DOCTYPE html>
<html>
<head>
<title>销售管理</title>
<#include "/header.html">
</head>
<body>
<div id="witapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">
			<div class="form-group col-sm-2">
				<input type="text" class="form-control" v-model="q.key" @keyup.enter="query" placeholder="关键字查询">
			</div>
			<a class="btn btn-default" @click="query">查询</a>
			<#if shiro.hasPermission("market:save")>
            <a class="btn btn-success" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("market:update")>
            <a class="btn btn-success" @click="update"><i class="fa fa-eye"></i>&nbsp;查看</a>
			</#if>
			<#if shiro.hasPermission("market:delete")>
            <a class="btn btn-success" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
		</div>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>
    
    <div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
			<div class="form-group">
			   	<div class="col-sm-2 control-label">经营主体名称</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="market.subjectName" placeholder="经营主体名称"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">事项名称</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="market.name" placeholder="事项名称"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">数量</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="market.count" placeholder="数量"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">单价</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="market.unit" placeholder="单价"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">金额</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="market.money" placeholder="金额"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">购买商家</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="market.units" placeholder="购买商家"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">经办时间</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="market.operatordate" placeholder="经办时间"/>
			    </div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">状态</div>
				<label class="radio-inline">
					<input type="radio" name="status" value="0" v-model="market.status"/> 禁用
				</label>
				<label class="radio-inline">
					<input type="radio" name="status" value="1" v-model="market.status"/> 正常
				</label>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">备注</div>
			   	<div class="col-sm-10">
			      <textarea rows="8" class="form-control" v-model="market.description" placeholder="备注"></textarea>
			    </div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label"></div> 
				<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>
</div>

<script src="${request.contextPath}/statics/js/modules/wit/market.js?_${.now?long}"></script>
</body>
</html>